package com.liu.user.exception;

import com.liu.common.entity.Result;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by Administrator on 2019/8/22 0022.
 */
@RestControllerAdvice
public class MyGlobalExceptionHandler {


    @ExceptionHandler({Exception.class})
    public Result handException(HttpServletRequest request ,Exception e) throws Exception{


        return new Result(false,10001,e.getMessage());

    }



}
